<template>
    <el-config-provider :locale="zhCn">
		<router-view v-if="isRouterAlive"/>
    </el-config-provider>
</template>

<script setup lang="ts">
import { ElConfigProvider } from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
</script>

<script lang="ts">
  export default {
    name: 'App',
    provide(){
      return{
        reload:this.reload,
      }
    },

    data(){
      return{
        isRouterAlive:true,
      }
    },

    methods:{
      reload(){
        this.isRouterAlive = false;
        this.$nextTick(function () {
          this.isRouterAlive = true;
        });
      }
    },
  }
</script>
<style>
@import './assets/css/main.css';
@import './assets/css/color-dark.css';
</style>
